import request from '@/utils/request'

export default {

  addStudent(student) {
    return request({
      url: '/admin/student',
      method: 'post',
      data: student
    })
  },
  importStudents(file) {
    console.log(file)
    return request({
      url: '/admin/student/import',
      method: 'post',
      data: file
    })
  },
  deleteStudent(studentid) {
    return request({
      url: '/admin/student/' + studentid,
      method: 'delete'
    })
  },
  deleteStudents(allStudentIds) {
    return request({
      url: '/admin/student/list',
      method: 'delete',
      data: allStudentIds
    })
  },
  updateStudent(student) {
    return request({
      url: '/admin/student',
      method: 'put',
      data: student
    })
  },
  resetPassword(studentid) {
    return request({
      url: '/admin/student/' + studentid,
      method: 'put'
    })
  },
  queryStudent(studentid) {
    return request({
      url: '/admin/student/' + studentid,
      method: 'get'
    })
  },
  queryStudents(studnetQuery) {
    return request({
      url: '/admin/student/list',
      method: 'post',
      data: studnetQuery
    })
  }

}
